<?php
// XXX session start is requires by userLogin, we need some sort of hook to signal that a block requires it so it can get put in the skin.( Somewhat dangerous to have it included in the block, or else risk echoing before it's required );
session_start();

require_once 'tpl/use/block/styleCore.php';
require_once 'tpl/use/block/userLogin.php';
require_once 'util/perm.php';
require_once 'util/xhtml.php';

function skin_ShowFora( $fora ) {
  styleHead();

  UserLoginBar();
  foreach( $fora as $forum ) {
    echo '<p>',
         linkAt('spit.php', array( 'type' => 'THREAD', 
                                   'fnum' => $forum['id'], 
                                   'start' => 0, 
                                   'inc' => 6)
                ,"${forum['title']} - ${forum['datum']}" )
         ,'</p>';
  }
  if( hasPerm( 'edit.forum' ) ) {
    echo linkAt('admin.php', array( 'type' => 'FORUM' ),
                'Edit Forums' );
  }
  styleFoot();
}
?>
